package fr.insta.reverse.uml.service;

import java.util.List;

import fr.insta.reverse.uml.bean.Visibilite;
import fr.insta.reverse.uml.dao.DaoFactory;
import fr.insta.reverse.uml.dao.DaoName;
import fr.insta.reverse.uml.dao.DaoVisibilite;

public class ServiceVisibilite implements IService<Visibilite>
{
	DaoVisibilite dao = (DaoVisibilite) DaoFactory.getDao(DaoName.Visibilite);

	@Override
	public Visibilite get(int _id)
	{
		return dao.findById(_id);
	}

	@Override
	public List<Visibilite> getObjects()
	{
		return dao.getAll();
	}

	@Override
	public Visibilite insert(Visibilite _object)
	{
		return dao.save(_object);
	}

	@Override
	public Visibilite update(Visibilite _object)
	{
		return dao.save(_object);
	}

	@Override
	public boolean delete(Visibilite _object)
	{
		return dao.remove(_object);
	}
}
